package rubik.mutators;

import rubik.ICubeSolution;

public class RandomMutator extends AbstractMutator {
	
	private ICubeSolutionMutator[] _mutators;
	
	public RandomMutator () {
		this._mutators = new ICubeSolutionMutator[] { new AddRemoveMutator(), new AddSeqMutator(), new LastSeqMutator(), new RandomSeqMutator() };
	}

	@Override
	protected void mutateSolution(ICubeSolution sol) {
		int r = R.nextInt(this._mutators.length);
		this._mutators[r].mutate(sol);
	}

}
